function mystickyelements_present(){var e=jQuery(".mysticky-welcomebar-fixed").data("after-triger"),t=jQuery(".mystickyelements-fixed").length,a=jQuery(".mysticky-welcomebar-fixed").data("position"),s=0;if(0!=jQuery("#wpadminbar").length)s=jQuery("#wpadminbar").height();if(jQuery(window).width()<=600&&0!=jQuery(window).scrollTop()&&"top"==a){jQuery(".mysticky-welcomebar-fixed").css("top","0px");var i=jQuery(".mysticky-welcomebar-fixed").outerHeight();"none"===jQuery(".mysticky-welcomebar-fixed").css("display")&&(i=0),jQuery("#mysticky-nav").css("top",i+"px")}else if("top"==a){var o=s+jQuery(".mysticky-welcomebar-fixed").outerHeight();"none"===jQuery(".mysticky-welcomebar-fixed").css("display")&&(o=s+0),jQuery(".mysticky-welcomebar-fixed").css("top",s+0+"px"),jQuery("#mysticky-nav").css("top",o+"px")}if(t){i=jQuery(".mysticky-welcomebar-fixed").outerHeight();var c=jQuery(".mystickyelements-fixed").height(),r=i+c;if(jQuery(window).width()<=1024&&jQuery(".mystickyelements-fixed").hasClass("mystickyelements-position-mobile-top"))if("after_a_few_seconds"==e){if(jQuery(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-mobile")){var m=1e3*jQuery(".mysticky-welcomebar-fixed").data("triger-sec");setTimeout(function(){"top"==a?(jQuery(".mystickyelements-fixed").css("top",i),$("html").animate({"margin-top":r+"px"},1e3,function(){$("html").css("cssText","margin-top:"+r+"px!important;")})):(jQuery(".mystickyelements-fixed").css("top",""),jQuery("html").attr("style","margin-bottom: "+i+"px !important"))},m)}}else if("after_scroll"===e){100*$(window).scrollTop()/($(document).height()-$(window).height())>$(".mysticky-welcomebar-fixed").data("triger-sec")&&jQuery(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-mobile")&&("top"==a?(jQuery(".mystickyelements-fixed").css("top",i),$("html").animate({"margin-top":r+"px"},1e3,function(){$("html").css("cssText","margin-top:"+r+"px!important;")})):(jQuery(".mystickyelements-fixed").css("top",""),jQuery("html").attr("style","margin-bottom: "+i+"px !important")))}}}function IsEmail(e){return!!/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)}function validatePhone(e){return!!/^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/.test(e)}jQuery(document).ready(function(e){var t=0;if(0!=e("#wpadminbar").length)t=e("#wpadminbar").height();var a=t+jQuery(".mysticky-welcomebar-fixed").outerHeight();"top"==jQuery(".mysticky-welcomebar-fixed").data("position")?jQuery(".mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed").css("top","-"+a+"px"):jQuery(".mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed").css("bottom","-"+a+"px");var s=e(".et_fixed_nav #top-header").outerHeight(),i=a+s,o=e(".mysticky-welcomebar-fixed").data("aftersubmission");if("dont_show_welcomebar"==o)var c=localStorage.getItem("welcomebar_close");else if("show_welcomebar_next_visit"==o)c=sessionStorage.getItem("welcomebar_close");else{sessionStorage.removeItem("welcomebar_close"),localStorage.removeItem("welcomebar_close");c=null}if(null===c){var r=jQuery(".mysticky-welcomebar-fixed").data("after-triger");if(jQuery("body").addClass("mysticky-welcomebar-apper"),"after_a_few_seconds"==r&&e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-desktop")&&e(window).width()>767){var m=1e3*jQuery(".mysticky-welcomebar-fixed").data("triger-sec"),y=e(".mysticky-welcomebar-fixed").data("position"),l=e(".mysticky-welcomebar-fixed").outerHeight();setTimeout(function(){jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),e(".mysticky-welcomebar-fixed").addClass("entry-effect"),"top"==y?(jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),jQuery(".mysticky-welcomebar-fixed").css("top",t+0+"px"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-bottom",""),jQuery("#mysticky_divi_style").remove(),jQuery(".et_fixed_nav #top-header").css("top",l+"px"),jQuery("head").append('"),e("html").animate({"margin-top":a+"px"},1e3,function(){e("html").css("cssText","margin-top:"+a+"px!important;")}),e("#mysticky-nav").css("top",a+"px")):(jQuery(".mysticky-welcomebar-fixed").css("bottom","0"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-top",""),jQuery("#mysticky_divi_style").remove(),jQuery(".et_fixed_nav #top-header").css("top",""),e("html").attr("style","margin-bottom: "+a+"px !important"))},m)}if(e(window).width()<767&&"after_a_few_seconds"==r&&e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-mobile")){m=1e3*jQuery(".mysticky-welcomebar-fixed").data("triger-sec"),y=e(".mysticky-welcomebar-fixed").data("position"),l=e(".mysticky-welcomebar-fixed").outerHeight();setTimeout(function(){jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),e(".mysticky-welcomebar-fixed").addClass("entry-effect"),jQuery("#mysticky_divi_style").remove(),jQuery(".et_fixed_nav #top-header").css("top",""),"top"==y?(jQuery(".mysticky-welcomebar-fixed").css("top",t+0+"px"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-bottom",""),e("html").animate({"margin-top":a+"px"},1e3,function(){e("html").css("cssText","margin-top:"+a+"px!important;")}),e("#mysticky-nav").css("top",a+"px")):(jQuery(".mysticky-welcomebar-fixed").css("bottom","0"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-top",""),e("html").attr("style","margin-bottom: "+a+"px !important"))},m)}mystickyelements_present()}e(window).resize(function(){var a=jQuery(".mysticky-welcomebar-fixed").outerHeight();if("dont_show_welcomebar"==o)var s=localStorage.getItem("welcomebar_close");else if("show_welcomebar_next_visit"==o)s=sessionStorage.getItem("welcomebar_close");else{sessionStorage.removeItem("welcomebar_close"),localStorage.removeItem("welcomebar_close");s=null}if(null===s){var c=jQuery(".mysticky-welcomebar-fixed").data("after-triger");if(e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-notapper")?jQuery("body").removeClass("mysticky-welcomebar-apper"):jQuery("body").addClass("mysticky-welcomebar-apper"),"after_a_few_seconds"==c){var r=1e3*jQuery(".mysticky-welcomebar-fixed").data("triger-sec"),m=e(".mysticky-welcomebar-fixed").data("position"),y=e(".mysticky-welcomebar-fixed").outerHeight();e(window).width()<767?e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-mobile")&&setTimeout(function(){jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),e(".mysticky-welcomebar-fixed").addClass("entry-effect"),jQuery("#mysticky_divi_style").remove(),jQuery(".et_fixed_nav #top-header").css("top",""),"top"==m?(jQuery(".mysticky-welcomebar-fixed").css("top",t+0+"px"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-bottom",""),e("html").animate({"margin-top":a+"px"},1e3,function(){e("html").css("cssText","margin-top:"+a+"px!important;")}),e(".mysticky-welcomebar-apper #mysticky-nav").css("top",a+"px")):(jQuery(".mysticky-welcomebar-fixed").css("bottom","0"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-top",""),e("html").attr("style","margin-bottom: "+a+"px !important"))},r):e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-desktop")&&setTimeout(function(){jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),e(".mysticky-welcomebar-fixed").addClass("entry-effect"),"top"==m?(jQuery(".mysticky-welcomebar-fixed").css("top",t+0+"px"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-bottom",""),jQuery("#mysticky_divi_style").remove(),jQuery(".mysticky-welcomebar-apper.et_fixed_nav #top-header").css("top",y+"px"),jQuery("head").append('"),e("html").animate({"margin-top":a+"px"},1e3,function(){e("html").css("cssText","margin-top:"+a+"px!important;")}),e(".mysticky-welcomebar-apper #mysticky-nav").css("top",a+"px")):(jQuery(".mysticky-welcomebar-fixed").css("bottom","0"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-top",""),jQuery("#mysticky_divi_style").remove(),jQuery(".et_fixed_nav #top-header").css("top",""),e("html").attr("style","margin-bottom: "+a+"px !important"))},r)}mystickyelements_present()}}),jQuery(window).on("scroll",function(){if("dont_show_welcomebar"==o)var s=localStorage.getItem("welcomebar_close");else if("show_welcomebar_next_visit"==o)s=sessionStorage.getItem("welcomebar_close");else{sessionStorage.removeItem("welcomebar_close"),localStorage.removeItem("welcomebar_close");s=null}if(null===s){e(".mysticky-welcomebar-fixed").outerHeight();if("top"==(m=e(".mysticky-welcomebar-fixed").data("position"))&&e("#mysticky-nav").css("top",a+"px"),"after_scroll"===r){var i=100*e(window).scrollTop()/(e(document).height()-e(window).height()),c=jQuery(".mysticky-welcomebar-fixed").data("triger-sec"),m=e(".mysticky-welcomebar-fixed").data("position");e(".mysticky-welcomebar-fixed").outerHeight();i>c&&(e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-desktop")&&e(window).width()>767&&(jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),e(".mysticky-welcomebar-fixed").addClass("entry-effect"),"top"==m?(jQuery(".mysticky-welcomebar-fixed").css("top",t+0+"px"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-bottom",""),e("html").animate({"margin-top":a+"px"},1e3,function(){e("html").css("cssText","margin-top:"+a+"px!important;")}),e("#mysticky-nav").css("top",a+"px")):(jQuery(".mysticky-welcomebar-fixed").css("bottom","0"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-top",""),e("html").attr("style","margin-bottom: "+a+"px !important"))),e(".mysticky-welcomebar-fixed").hasClass("mysticky-welcomebar-display-mobile")&&e(window).width()<767&&(jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-animation"),e(".mysticky-welcomebar-fixed").addClass("entry-effect"),"top"==m?(jQuery(".mysticky-welcomebar-fixed").css("top",t+0+"px"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-bottom",""),e("html").animate({"margin-top":a+"px"},1e3,function(){e("html").css("cssText","margin-top:"+a+"px!important;")}),e("#mysticky-nav").css("top",a+"px")):(jQuery(".mysticky-welcomebar-fixed").css("bottom","0"),jQuery(".mysticky-welcomebar-fixed").css("opacity","1"),e("html").css("margin-top",""),e("html").attr("style","margin-bottom: "+a+"px !important"))))}mystickyelements_present()}}),jQuery(".mysticky-welcomebar-close, .mysticky-welcomebar-btn a").on("click",function(t){""==e(this).attr("href")&&t.preventDefault();var s=!0,i=100;if(jQuery(".mysticky-welcomebar-lead-content").length>0&&!e(this).hasClass("mysticky-welcomebar-close")){if(""==jQuery("#contact-lead-name-0").val()||""==jQuery("#contact-lead-phone-0").val()&&""==jQuery("#contact-lead-email-0").val())return localStorage.removeItem("welcomebar_close_0"),sessionStorage.removeItem("welcomebar_close_0"),e(".input-error").length&&e(".input-error").remove(),"none"!=jQuery("#contact-lead-name-0").css("display")&&""==jQuery("#contact-lead-name-0").val()&&"none"!=jQuery("#contact-lead-email-0").css("display")&&""==jQuery("#contact-lead-email-0").val()?(e('
Please enter your name and email
').insertAfter(jQuery("#contact-lead-name-0")),s=!1):"none"!=jQuery("#contact-lead-name-0").css("display")&&""==jQuery("#contact-lead-name-0").val()&&"none"!=jQuery("#contact-lead-phone-0").css("display")&&""==jQuery("#contact-lead-phone-0").val()?(e('
Please enter your name and phone
').insertAfter(jQuery("#contact-lead-name-0")),s=!1):"none"!=jQuery("#contact-lead-name-0").css("display")&&""==jQuery("#contact-lead-name-0").val()?(e('
Please enter your name
').insertAfter(jQuery("#contact-lead-name-0")),s=!1):"none"!=jQuery("#contact-lead-email-0").css("display")&&""==jQuery("#contact-lead-email-0").val()?(e('
Please, enter your email
').insertAfter(jQuery("#contact-lead-email-0")),s=!1):"none"!=jQuery("#contact-lead-phone-0").css("display")&&""==jQuery("#contact-lead-phone-0").val()&&(e('
Please, enter your phone
').insertAfter(jQuery("#contact-lead-phone-0")),s=!1),0==s?e(".mysticky-welcomebar-widget-0 .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px"):e(".mysticky-welcomebar-widget-0 .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0"),!1;if("none"!=jQuery("#contact-lead-email-0").css("display")&&1!=IsEmail(jQuery("#contact-lead-email-0").val())&&(e(".input-error").length&&e(".input-error").remove(),e('
Please, enter valid email
').insertAfter(jQuery("#contact-lead-email-0")),s=!1),"none"!=jQuery("#contact-lead-phone-0").css("display")&&1!=validatePhone(jQuery("#contact-lead-phone-0").val())&&(e(".input-error").length&&e(".input-error").remove(),e('
Please, enter valid phone
').insertAfter(jQuery("#contact-lead-phone-0")),s=!1),1!=s)return e(".mysticky-welcomebar-widget-0 .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px"),!1;var c=[];c.contact_name=jQuery("#contact-lead-name-0").val(),c.contact_email=jQuery("#contact-lead-email-0").val(),c.contact_phone=jQuery("#contact-lead-phone-0").val(),c.contact_page_link=jQuery("#contact-lead-pagelink-0").val(),1==e(".mysticky-welcomebar-fixed").data("show-success-message")&&(e(".mysticky-welcomebar-fixed .mysticky-welcomebar-lead-content").hide(),e(".mysticky-welcomebar-fixed .mysticky-welcomebar-content p").hide(),e(".mysticky-welcomebar-fixed .mysticky-welcomebar-btn.contact-lead-button").hide(),e(".mysticky-welcomebar-fixed .mysticky-welcomebar-thankyou-content").show(),e(".mysticky-welcomebar-fixed .mysticky-welcomebar-thankyou-content p").show());i=2e3;jQuery.ajax({url:welcomebar_frontjs.ajaxurl,type:"post",data:"contact_name="+c.contact_name+"&contact_email="+c.contact_email+"&contact_phone="+c.contact_phone+"&action=stickymenu_contact_lead_form&widget_id=0&page_link="+c.contact_page_link+"&save_form_lead=1&wpnonce="+welcomebar_frontjs.ajax_nonce,success:function(t){e(".mysticky-welcomebar-widget-0 .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0"),jQuery("#contact-lead-name-0").val(""),jQuery("#contact-lead-email-0").val(""),jQuery("#contact-lead-phone-0").val("")}})}else e(this).hasClass("mysticky-welcomebar-close")&&localStorage.setItem("is_close_trigger_0","yes");setTimeout(function(){"show_welcomebar_every_page"!=o&&("dont_show_welcomebar"==o?(sessionStorage.removeItem("welcomebar_close"),localStorage.setItem("welcomebar_close","close")):"show_welcomebar_next_visit"==o&&(localStorage.removeItem("welcomebar_close"),sessionStorage.setItem("welcomebar_close","close")));var t=e(".mysticky-welcomebar-fixed").data("position");e(".mysticky-welcomebar-fixed").outerHeight();if(jQuery(".mysticky-welcomebar-fixed").addClass("mysticky-welcomebar-notapper"),jQuery("body").removeClass("mysticky-welcomebar-apper"),jQuery(".mysticky-welcomebar-fixed").slideUp("slow"),"top"==t?jQuery(".mysticky-welcomebar-fixed").css("top","-"+a+"px"):jQuery(".mysticky-welcomebar-fixed").css("bottom","-"+a+"px"),jQuery("#mysticky_divi_style").remove(),jQuery(".et_fixed_nav #top-header").css("top",""),jQuery("html").css("margin-top",""),jQuery("html").css("margin-bottom",""),e("#mysticky-nav").css("top","0px"),e(".mystickyelements-fixed").length&&e(window).width()<=1024&&e(".mystickyelements-fixed").hasClass("mystickyelements-position-mobile-top")&&"top"==t){var s=e(".mystickyelements-fixed").height();e(".mystickyelements-fixed").css("top",""),e("html").animate({"margin-top":s+"px"},1e3,function(){e("html").css("cssText","margin-top:"+s+"px!important;")})}},i),jQuery("#contact-lead-name-0").val(""),jQuery("#contact-lead-email-0").val(""),jQuery("#contact-lead-phone-0").val("")}),e(".mysticky-welcomebar-close").on("keydown",function(t){"13"==t.keyCode&&e(this).trigger("click")})}),jQuery(".mysticky-welcomebar-fixed").on("animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",function(){jQuery(this).removeClass("animation-start")}),jQuery(document).ready(function(){var e=jQuery(".mysticky-welcomebar-fixed");setInterval(function(){e.addClass("animation-start")},3500)});